home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
wlib11_2.zip
/
EXAMPLES.EXE
/
EXAM56.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-13
|
797b
|
24 lines
#include "window.h"
#define NORM CREATE_VIDEO_ATTRIBUTE(black,white)
#define DATEMASK "__/__/__"
char buf1[] = "123456";
char buf2[9];
WPOINTER w;
main()
{
WindowInitializeSystem();
WindowSaveInitial(0);
w = WindowInitialize(BORDER,1,1,40,10,NORM,NORM,SINGLEBOX);
WindowOpen(w);
WindowDisplay(w,1,NOEFFECT);
TranslateStringToMaskString(buf1,DATEMASK,buf2,'_',0);
WindowPrintf(w,
"The original string is %s\nThe translated string is %s\n",
buf1,buf2);
TranslateStringToMaskString(buf1,DATEMASK,buf2,'_',1);
WindowPrintf(w,
"The original string is %s\nThe translated string is %s\n",
buf1,buf2);
}